﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="EWDTAssignment.Login" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/jscript">
        function inputBlur(textBox, content) {
            if (textBox.value.length <= 0) {
                textBox.value = content;
                textBox.style.color = "Gray";
            }
        }
        function inputFocus(textBox, content) {
            if (textBox.value == content) {
                textBox.value = "";
                textBox.style.color = "Black";
            }
        }
    </script>
    <style type="text/css">
        .style1
        {
            width: 92px;
        }
        .style2
        {
            width: 140px;
        }
        .style3
        {
        width: 170px;
    }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table style="width:100%;">
        <tr>
            <td class="style2" width="120">
                Username:</td>
            <td class="style3">
                <asp:TextBox ID="UsernameTbx" onblur="inputBlur(this,'Enter User Name')" 
                    onfocus="inputFocus(this,'Enter User Name')" runat="server" Width="180px" value="Enter User Name" style="color:Gray"></asp:TextBox>
            </td>
            <td class="style1" width="120">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    Display="Dynamic" ErrorMessage="*Username is required" 
                    ControlToValidate="UsernameTbx" InitialValue="Enter User Name"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style2" width="150">
                Password:</td>
            <td class="style3">
                <asp:TextBox ID="PasswordTbx" runat="server" Width="180px" TextMode="Password" 
                    ToolTip="Enter Password"></asp:TextBox>
            </td>
            <td class="style1" width="120">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    Display="Dynamic" ErrorMessage="*Password is required" 
                    ControlToValidate="PasswordTbx"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style2" width="150">
                Verify Code:</td>
            <td class="style3">
                <div>
                <asp:TextBox ID="verificationTbx" onblur="inputBlur(this,'Enter Verify Code')" 
                    onfocus="inputFocus(this,'Enter Verify Code')" runat="server" Width="114px" value="Enter Verify Code" style="color:Gray"></asp:TextBox><img src="verification.ashx" onclick="this.src='verification.ashx?aaa='+new Date()+''" /></div>
            </td>
            <td class="style1" width="120">
                <asp:Label ID="VerificationLabel" runat="server"></asp:Label>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="verificationTbx" Display="Dynamic" 
                    ErrorMessage="Verify Code is required" InitialValue="Enter Verify Code"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style2" width="150">
                <asp:Button ID="Button1" runat="server" Text="Login" Width="73px" 
                    onclick="Button1_Click" />
            </td>
            <td class="style3">
                <asp:HyperLink ID="HyperLink1" runat="server" 
                    NavigateUrl="~/RecoverPassword.aspx">Forget Password?</asp:HyperLink>
            </td>
            <td class="style1" width="120">
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>
